package com.ruoyi.sl.service;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.sl.domain.SlOddjob;
import com.ruoyi.sl.domain.SlRwork;
import com.ruoyi.sl.pojo.SlOddjobDateForm;
import com.ruoyi.sl.pojo.SlRworkDateForm;

/**
 * 零工报工Service接口
 * 
 * @author admin
 * @date 2024-06-11
 */
public interface ISlOddjobService 
{

    //获报工单ID和参与人获取参与人的所有报工项
    public List<SlOddjob> selectSlOddjobListByRfworkIdAndMember(Long rfworkId,String memberUser);

    /**
     * 查询零工报工
     * 
     * @param oddjobId 零工报工主键
     * @return 零工报工
     */
    public SlOddjob selectSlOddjobByOddjobId(Long oddjobId);

    /**
     * 查询零工报工列表
     * 
     * @param slOddjob 零工报工
     * @return 零工报工集合
     */
    public List<SlOddjob> selectSlOddjobList(SlOddjob slOddjob);

    /**
     * 查询零工报工列表
     *
     * @param oddjobDate 日期
     * @return 零工报工集合
     */
    public List<SlOddjob> selectSlOddjobUserListByDate(Date oddjobDate);

    /**
     * 所有已通过审核的零工报工单
     *
     * @return 集合
     */
    public List<SlOddjob> selectAllApprovedSlOddjobList();

    /**
     * 所有未提交的报工项
     *
     * @return 集合
     */
    public List<SlOddjob> selectSlOddjobListByNoSubmit(SlOddjob slOddjob);

    /**
     * 根据报工单ID查询所有报工项
     *
     * @return 集合
     */
    public List<SlOddjob> selectSlOddjobListByRfworkId(Long rfworkId);

    /**
     * 新增零工报工
     * 
     * @param slOddjob 零工报工
     * @return 结果
     */
    public int insertSlOddjob(SlOddjob slOddjob);

    /**
     * 修改零工报工
     * 
     * @param slOddjob 零工报工
     * @return 结果
     */
    public int updateSlOddjob(SlOddjob slOddjob);

    /**
     * 修改报工单时间
     *
     * @param slOddjob 报工单
     * @return 结果
     */
    public int updateSlOddjobDateTime(SlOddjob slOddjob);

    /**
     * 批量删除零工报工
     * 
     * @param oddjobIds 需要删除的零工报工主键集合
     * @return 结果
     */
    public int deleteSlOddjobByOddjobIds(Long[] oddjobIds);

    /**
     * 删除零工报工信息
     * 
     * @param oddjobId 零工报工主键
     * @return 结果
     */
    public int deleteSlOddjobByOddjobId(Long oddjobId);

    /**
     * 将报工单的审核标记改为3，已计算工资
     *
     * @param oddjobId 报工单ID
     * @return 结果
     */
    public int updateSlOddjobToOver(Long oddjobId);


    /**
     * 创建一个报工单关联所有报工项
     *
     * @param slOddjobDateForm 报工单
     * @return 结果
     */
    public int insertDateOddjobs(SlOddjobDateForm slOddjobDateForm);
}
